package demo2;

/**
 * Created with IntelliJ IDEA.
 * User: 12629
 * Date: 2021/10/29
 * Time: 9:26
 * Description:
 */
interface IShape {

  /*  int a = 10;
    int a2 = 20;
    int a3 = 30;
*/
    void draw();

   /* default public void  func() {
        System.out.println("这是一个默认方法");
    }
    default public void  func2() {
        System.out.println("这是一个默认方法");
    }*/
}
class Cycle implements IShape {

    @Override
    public void draw() {
        System.out.println("圆圈");
    }
}
class Rect implements IShape {

    @Override
    public void draw() {
        System.out.println("矩形");
    }
}

public class Test {

    public static void drawMap(IShape shape) {
        shape.draw();
    }

    public static void main(String[] args) {
        //Shape shape = new Shape();
        IShape iShape1 = new Cycle();
        IShape iShape2 = new Rect();

    }
}
